<?php

session_cache_expire(999999999);
if (!isset($_SESSION)) {
    session_start();
}

$lang = $_REQUEST['lang'];
$company = $_REQUEST['company'];

//$company='elitech';

$url = 'http://1.234.53.52/mail/sendmail_money.php';
//$url = 'http://localhost/mail/sendmail_money.php';
$fields = array('company' => urlencode($company),
    'lang' => urlencode($lang),
    'username' => urlencode($_SESSION['fullname'])
);
//url-ify the data for the POST
foreach ($fields as $key => $value) {
    $fields_string .= $key . '=' . $value . '&';
}
rtrim($fields_string, '&');

//open connection
$ch = curl_init();

//set the url, number of POST vars, POST data
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, count($fields));
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);

//execute post
$result = curl_exec($ch);

//close connection
curl_close($ch);
?>